#include"comm.hpp"
#include<cstdio>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

int main()
{
    int fd=open(FIFOFILE,O_WRONLY);
    if(fd==-1){
        perror("open error\n");
    }
    string buffer;
    while(true){
        cout<<"Please input: ";
        getline(cin,buffer);
        int n=write(fd,buffer.c_str(),sizeof(buffer));
        if(n==-1){
            perror("write error\n");
        }
    }
    return 0;
}